package 字节流读文件;

import java.io.FileInputStream;
import java.io.IOException;

public class FileImputSteam {
//     public static void main(String[] args) throws Exception{
//    	 FileInputStream in=new FileInputStream("test.txt");
//    	 int b=0;
//    	 while(true){
//    		 b=in.read();
//    		 if(b==-1){
//    			 break;
//    		 }
//    		 System.out.println(b);
//    	 }
//    	 in.close();
//	}
	
	public static void main(String[] args) throws IOException {
		FileInputStream in=new FileInputStream("a.txt");
		int b=0;
		while(true){
			b=in.read();
			if(b==-1){
				break;
			}
			System.out.println(b);
		}
		in.close();
	}
}
